//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CrontabLog, CrontabLogResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCrontabLogList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CrontabLogResponse>(`/uctoo/crontab_log/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCrontabLog = async (id: string) => {
  return requestClient.get<CrontabLog>(`/uctoo/crontab_log/${id}`);
};

export const adductooCrontabLog = async (data: Partial<CrontabLog>) => {
  return requestClient.post<CrontabLog>('/uctoo/crontab_log/add', data);
};

export const edituctooCrontabLog = async (data: Partial<CrontabLog>) => {
  return requestClient.post<CrontabLog>('/uctoo/crontab_log/edit', data);
};

export const deleteuctooCrontabLog = async (id: string) => {
  return requestClient.post<any>('/uctoo/crontab_log/del', { id });
};
